package cn.sdstudio.service;

import cn.sdstudio.model.BaseEntity;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Collection;

public interface BaseService <T extends BaseEntity> extends IService<T> {
    /**
     * 根据ID获取（带悲观锁）
     */
    T getByIdForUpdate(Long id);

    /**
     * 批量保存
     */
    @Override
    boolean saveBatch(Collection<T> list);
}
